﻿#ifndef EVENT_H
#define EVENT_H
#include <QTimer>
#include <QDateTime>
#include <QVector>
#include "bellrings.h"
class Event {
private:
    QString name;//事件名称
    QString description;//描述
    QDateTime time;//事件时间
    QTimer timer;//计时器
    QVector<QString> people;//参与人员（想法来自飞书
    bool inDay;//表示记录的时间是日期+时间还是时间
    bool needRing = true;
    BellRings bellRing;//铃声
    int importance = 0;//0普通 1重要
public:
    Event(QString name,QString decription,QDateTime time,QVector<QString> people,BellRings bellring = DEFAULT);
    Event(const Event&event);
    Event() = default;
    void operator=(const Event&event);
    void addPerson(QString name);

    const QString &getName() const;
    void setName(const QString &newName);

    const QString &getDescription() const;
    void setDescription(const QString &newDescription);

    const QDateTime &getTime() const;
    void setTime(const QDateTime &newTime);

    BellRings getBellRing() const;
    void setBellRing(BellRings newBellRing);

    const QVector<QString> &getPeople() const;
    void setPeople(const QVector<QString> &newPeople);
    const QTimer &getTimer() const;
    void setTimer(const QTimer &newTimer);

    bool getInDay() const;
    void setInDay(bool newInDay);

    int getImportance()const;
    void setImportance(int v);

    bool getNeedRing() const;
    void setNeedRing(bool value);

signals:
private slots:
    void timeArrive();
};

#endif // EVENT_H
